home *** CD-ROM | disk | FTP | other *** search
- ;***********************************************************
- ;This lisp routine plots the interpolated contour elevations between
- ;user selected survey points. The elevation of each selected
- ;survey point is requested along with the elevation of the
- ;first itermediate contour elevation.
-
- ;When selecting survey points for interpolation, select
- ;lowest elevation point first then the higher point.
- ;The lisp routine notes each interpolated point with the
- ;appropriate elevation for that interpolated point.
- ;***********************************************************
- (defun c:interp ()
- (setvar "cmdecho" 0)
- (setvar "blipmode" 0)
- (command "osnap" "node")
- (setq cnt 0)
- (setq tp1 (getpoint "\nSelect survey point 1: "))
- (setq tp2 (getpoint "\nSelect survey point 2: "))
- (setq ev1 (getreal "\nElevation of point 1: "))
- (setq ev2 (getreal "\nElevation of point 2: "))
- (setq j (getreal "\nElevation of first iterpolated point: "))
- (command "osnap" "none")
- (setq d (distance tp1 tp2))
- (setq la (angle tp1 tp2))
- (setq evd (* 10 (abs (- ev1 ev2))))
- (setq icd (/ d evd))
- (setq iev ev1)
- (WHILE (< IEV J)
- (setq cnt (+ 1 cnt))
- (setq iev (+ 0.1 iev))
- )
- (setq cnt (1- cnt))
- (if (= cnt 0) (setq cnt (1+ cnt))
- )
- (setq ici (* cnt icd))
- (command "point" (polar tp1 la ici))
- (setq t (itoa (fix iev)))
- (command"text" "@" "" "" t)
- (setq np (getvar "lastpoint"))
- (setq iev (+ iev 1.0))
- (setq ci1 (* 10 icd))
- (while (< iev ev2)
- (command "point" (polar np la ci1))
- (setq t (itoa (fix iev)))
- (command "text" "@" "" "" t)
- (setq iev (+ iev 1.0))
- (setq np (getvar "lastpoint"))
- )
- (command "osnap" "none")
- (setvar "cmdecho" 1)
- (setvar "blipmode" 1)
- )